home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.5 Complementary Applications 2004 May / SGI IRIX 6.5 Complementary Applications 2004 May.iso / dist / OpenOffice.idb / usr / OpenOffice / help / en / sbasic.jar / text / sbasic / common / 01030400.xml < prev    next >
Encoding:
Extensible Markup Language  |  2002-01-24  |  11.2 KB  |  191 lines

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <html><head><title>Creating and Organizing Libraries and Modules</title><meta name="filename" content="text/sbasic/common/01030400"/><meta name="language" content="en-US"/><help:css-file-link xmlns:help="http://openoffice.org/2000/help"/><!--The CSS style header method for setting styles--><style type="text/css">
  3.  
  4.         table.Tabelle1{
  5.                 }
  6.         span.Tabelle1A{
  7.                 width:1.499cm;}
  8.         span.Tabelle1B{
  9.                 width:16.501cm;}
  10.         td.Tabelle1A1{
  11.                 }
  12.         table.Tabelle6{
  13.                 }
  14.         span.Tabelle6A{
  15.                 width:18cm;}
  16.         td.Tabelle6A1{
  17.                 }
  18.         table.Tabelle2{
  19.                 }
  20.         span.Tabelle2A{
  21.                 width:1.501cm;}
  22.         span.Tabelle2B{
  23.                 width:16.499cm;}
  24.         td.Tabelle2A1{
  25.                 }
  26.         table.Tabelle3{
  27.                 }
  28.         span.Tabelle3A{
  29.                 width:1.501cm;}
  30.         span.Tabelle3B{
  31.                 width:16.499cm;}
  32.         td.Tabelle3A1{
  33.                 }
  34.         table.Tabelle4{
  35.                 }
  36.         span.Tabelle4A{
  37.                 width:1.499cm;}
  38.         span.Tabelle4B{
  39.                 width:16.501cm;}
  40.         td.Tabelle4A1{
  41.                 }
  42.         p.P1{
  43.                 }
  44.         p.P2{
  45.                 }
  46.         p.P3{
  47.                 }
  48.         p.P4{
  49.                 }
  50.         p.P5{
  51.                 }
  52.         p.P6{
  53.                 }
  54.         p.P7{
  55.                 }
  56.         p.P8{
  57.                 }
  58.         p.P9{
  59.                 }
  60.         p.P10{
  61.                 }
  62.         p.P11{
  63.                 }
  64.         span.T1{
  65.                 font-weight:bold;}
  66.         span.fr1{
  67.                 }
  68.         span.fr2{
  69.                 }
  70.         </style></head><body>
  71.    
  72.    
  73.    <help:to-be-embedded Eid="anlegenverwalten" xmlns:help="http://openoffice.org/2000/help">
  74.    <p class="Head1"><help:link Id="66501">Creating and Organizing Libraries and Modules</help:link></p>
  75.    <p class="Paragraph">The following provides an introduction to working with libraries and modules. You will discover how to create and delete libraries and modules, and how to move <help:productname>%PRODUCTNAME</help:productname> Basic projects between documents, templates or the application.</p>
  76.    </help:to-be-embedded>
  77.    <table><tr class=""><th class="Tabelle1A1" style="text-align:left;"><span class="Tabelle1A">
  78.        <p class="TextInTable"><draw:image draw:style-name="fr1" draw:name="HIND_1" text:anchor-type="paragraph" svg:width="0.847cm" svg:height="0.847cm" draw:z-index="0" xlink:href="65980" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad" draw:filter-name="GIF - Graphics Interchange" xmlns:draw="http://openoffice.org/2000/drawing" xmlns:text="http://openoffice.org/2000/text" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"/></p>
  79.       </span></th><th class="Tabelle1A1" style="text-align:left;"><span class="Tabelle1B">
  80.        <p class="TextInTable">Generally, each <help:productname xmlns:help="http://openoffice.org/2000/help">%PRODUCTNAME</help:productname> Basic project should be stored in an individual module.</p>
  81.       </span></th></tr></table>
  82.    <p class="Paragraph"/>
  83.    <p class="Head2">Organizing Libraries</p>
  84.    <p class="Head3">Creating a New Library</p>
  85.    <ul class="L1">
  86.     <li class="">
  87.      <p class="P2">If you are not in the IDE, first select the <span class="T1">Macro</span> command in the <span class="T1">Tools</span> menu, and click <span class="T1">Organizer</span> in the dialog that follows.</p>
  88.     </li>
  89.     <li class="">
  90.      <p class="P2">If you are already in the IDE, click the <span class="T1">Modules</span> icon to open the corresponding dialog.</p>
  91.     </li>
  92.     <li class="">
  93.      <p class="P2">Click the <span class="T1">Library</span> tab.</p>
  94.     </li>
  95.    </ul>
  96.    <table><tr class=""><th class="Tabelle6A1" style="text-align:left;"><span class="Tabelle6A">
  97.        <p class="TextInTable"><draw:image draw:style-name="fr2" draw:name="Grafik1" text:anchor-type="paragraph" svg:width="11.271cm" svg:height="8.123cm" draw:z-index="4" xlink:href="66845" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad" draw:filter-name="GIF - Graphics Interchange" xmlns:draw="http://openoffice.org/2000/drawing" xmlns:text="http://openoffice.org/2000/text" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"/></p>
  98.       </span></th></tr></table>
  99.    <p class="Paragraph"/>
  100.    <ul class="L2">
  101.     <li class="">
  102.      <p class="P3">Use Application/Document and then <text:s text:c="" xmlns:text="http://openoffice.org/2000/text"/><span class="T1">Library</span> to select the object you want to attach the library to.</p>
  103.     </li>
  104.     <li class="">
  105.      <p class="P3">Click the button <span class="T1">New</span>, and <help:productname xmlns:help="http://openoffice.org/2000/help">%PRODUCTNAME</help:productname> Basic creates a new library.</p>
  106.     </li>
  107.    </ul>
  108.    <p class="Head3">Renaming a Library</p>
  109.    <ul class="L3">
  110.     <li class="">
  111.      <p class="P4">To change the default name of a library, proceed as follows:</p>
  112.     </li>
  113.     <li class="">
  114.      <p class="P4">Right-click the name of the library.</p>
  115.     </li>
  116.     <li class="">
  117.      <p class="P4">The cursor appears at the end of the name, indicating that you can now edit the name. Press Enter to confirm your changes.</p>
  118.     </li>
  119.    </ul>
  120.    <p class="Head3">Deleting a Library</p>
  121.    <ul class="L4">
  122.     <li class="">
  123.      <p class="P5">Use Application/Document and then <span class="T1">Library</span> to select the object to which the library to be deleted is attached.</p>
  124.     </li>
  125.    </ul>
  126.    <table><tr class=""><th class="Tabelle2A1" style="text-align:left;"><span class="Tabelle2A">
  127.        <p class="TextInTable"><draw:image draw:style-name="fr1" draw:name="HIND_2" text:anchor-type="paragraph" svg:width="0.847cm" svg:height="0.847cm" draw:z-index="1" xlink:href="65640" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad" draw:filter-name="GIF - Graphics Interchange" xmlns:draw="http://openoffice.org/2000/drawing" xmlns:text="http://openoffice.org/2000/text" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"/></p>
  128.       </span></th><th class="Tabelle2A1" style="text-align:left;"><span class="Tabelle2B">
  129.        <p class="TextInTable">Note: As soon as you delete a library, all existing modules and corresponding SUBS and FUNCTIONS are permanently deleted.</p>
  130.       </span></th></tr></table>
  131.    <ul class="L5">
  132.     <li class="">
  133.      <p class="P6">Click the <span class="T1">Delete</span> button and confirm the dialog that follows with "Yes".</p>
  134.     </li>
  135.    </ul>
  136.    <p class="Head2">Organizing Modules and Dialogs</p>
  137.    <p class="Head3">Renaming a Module or Dialog</p>
  138.    <p class="Paragraph">To change the default name, proceed as follows:</p>
  139.    <ul class="L6">
  140.     <li class="">
  141.      <p class="P7">Right-click the name of the module or dialog. A cursor appears at the end of the name, indicating that you can now edit the name.</p>
  142.     </li>
  143.     <li class="">
  144.      <p class="P7">Press Enter to confirm your changes.</p>
  145.     </li>
  146.    </ul>
  147.    <p class="Head3">Deleting a Module or Dialog</p>
  148.    <ul class="L7">
  149.     <li class="">
  150.      <p class="P8">In the list box, click on the respective module or dialog to be deleted.</p>
  151.     </li>
  152.    </ul>
  153.    <table><tr class=""><th class="Tabelle3A1" style="text-align:left;"><span class="Tabelle3A">
  154.        <p class="TextInTable"><draw:image draw:style-name="fr1" draw:name="HIND_3" text:anchor-type="paragraph" svg:width="0.847cm" svg:height="0.847cm" draw:z-index="2" xlink:href="65640" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad" draw:filter-name="GIF - Graphics Interchange" xmlns:draw="http://openoffice.org/2000/drawing" xmlns:text="http://openoffice.org/2000/text" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"/></p>
  155.       </span></th><th class="Tabelle3A1" style="text-align:left;"><span class="Tabelle3B">
  156.        <p class="TextInTable">Note: As soon as you delete a module, all contained SUBS and FUNCTIONS are permanently deleted.</p>
  157.       </span></th></tr></table>
  158.    <ul class="L8">
  159.     <li class="">
  160.      <p class="P9">Click the <span class="T1">Delete</span> button and confirm the dialog that follows with "Yes".</p>
  161.     </li>
  162.    </ul>
  163.    <p class="Head2">Organizing Projects among Documents or Templates</p>
  164.    <p class="Paragraph">Once you have developed a program or program project with <help:productname xmlns:help="http://openoffice.org/2000/help">%PRODUCTNAME</help:productname> Basic, you may wish to move specific parts of a program, or the entire macro project, to other documents or templates.</p>
  165.    <table><tr class=""><th class="Tabelle4A1" style="text-align:left;"><span class="Tabelle4A">
  166.        <p class="TextInTable"><draw:image draw:style-name="fr1" draw:name="HIND_4" text:anchor-type="paragraph" svg:width="0.847cm" svg:height="0.847cm" draw:z-index="3" xlink:href="65980" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad" draw:filter-name="GIF - Graphics Interchange" xmlns:draw="http://openoffice.org/2000/drawing" xmlns:text="http://openoffice.org/2000/text" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"/></p>
  167.       </span></th><th class="Tabelle4A1" style="text-align:left;"><span class="Tabelle4B">
  168.        <p class="TextInTable">Note that a <help:productname xmlns:help="http://openoffice.org/2000/help">%PRODUCTNAME</help:productname> Basic program generally consists of more than one macro - i.e., multiple SUBS. Therefore, if you have developed a program with multiple SUBS and FUNCTIONS that call each other, make sure you copy all necessary elements in order for your program to run in another document or template.</p>
  169.       </span></th></tr></table>
  170.    <p class="Head3">Moving or copying modules, dialogs or libraries between documents, templates and the application.</p>
  171.    <ul class="L9">
  172.     <li class="">
  173.      <p class="P10">First, open all documents or templates among which you want to move the various objects (modules, libraries, dialogs).</p>
  174.     </li>
  175.     <li class="">
  176.      <p class="P10">Select the <span class="T1">Macro</span> command in the <span class="T1">Tools</span> menu, and click <span class="T1">Organizer</span> in the dialog that follows.</p>
  177.     </li>
  178.     <li class="">
  179.      <p class="P10">To move an object to another document or application, simply click the object and drag it to the desired position. A horizontal line indicates between which objects the moved object will be positioned.</p>
  180.     </li>
  181.    </ul>
  182.    <p class="Paragraph">To copy an object, proceed in the same manner, but keep the <help:switch select="System" xmlns:help="http://openoffice.org/2000/help"><help:case select="MAC">(Option)</help:case><help:default>(Ctrl)</help:default></help:switch> key pressed while you drag the object to its new position.</p>
  183.    <p class="Head3">Inserting a Library from another <help:productname xmlns:help="http://openoffice.org/2000/help">%PRODUCTNAME</help:productname>Program</p>
  184.    <p class="Paragraph">Libraries are created in every <help:productname xmlns:help="http://openoffice.org/2000/help">%PRODUCTNAME</help:productname> application. As soon as a library is saved, it exists as a folder with two files script.xlb and dialog.xlb. You can then insert these into your project.</p>
  185.    <ul class="L10">
  186.     <li class="">
  187.      <p class="P11">Select the <span class="T1">Macro</span> command in the <span class="T1">Tools</span> menu, and click <span class="T1">Organizer</span> in the dialog that follows.</p>
  188.     </li>
  189.    </ul>
  190.    <p class="Paragraph">Click <span class="T1">Append</span> and select the data you want to insert.</p>
  191.   </body></html>